﻿using System.Threading.Tasks;
using Volo.Abp.Extension.Web.Pages.SettingManagement.EmailSetting;
using Volo.Abp.Extension.Web.Pages.SettingManagement.SiteSetting;
using Volo.Abp.SettingManagement.Web.Pages.SettingManagement;

namespace Volo.Abp.Extension.Web.Settings
{
    public class SettingPageContributor : ISettingPageContributor
    {
        public Task<bool> CheckPermissionsAsync(SettingPageCreationContext context)
        {
            return Task.FromResult(true);
        }

        public Task ConfigureAsync(SettingPageCreationContext context)
        {
            context.Groups.Add(new SettingPageGroup("site-setting", "站点设置", typeof(SiteSettingViewComponent)));
            context.Groups.Add(new SettingPageGroup("mail-setting", "邮件设置", typeof(EmailSettingViewComponent)));
            return Task.CompletedTask;
        }
    }
}
